package cn.com.thinvent.dispatch.dao;

import cn.com.thinvent.dispatch.entity.TravelManagement;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface TravelManagementMapper {

    void insertTravelManagement(TravelManagement travelManagement);

    void updateTravelManagement(TravelManagement travelManagement);

    TravelManagement selectTravelManagementById(String id);

    void deleteTravelManagementById(String id);

    List<TravelManagement> selectByPage(@Param("offset") int offset,
                                        @Param("limit") int limit,
                                        @Param("tripName") String tripName,
                                        @Param("startDate") Date startDate,
                                        @Param("endDate") Date endDate);

    long countAll(@Param("tripName") String tripName,
                  @Param("startDate") Date startDate,
                  @Param("endDate") Date endDate);

}
